package com.zxcz.tools;

/**
 * 自定义状态码
 * @author root
 */
public enum CustomHttpStatus {
	SUCCESS(0, "成功"),
	
	ACCOUNT_IS_NULL(1001,"账号不能为空"),
	
	USERNAME_IS_NULL(1002,"用户名称不能为空"),
	
	PASSWORD_IS_NULL(1003,"密码不能为空"),
	
	PASSWORD_LESS_SIX(1004,"密码不能少于6为"),
	
	PASSWORD_NOT_MATCH(1005,"两次密码不一致"),
	
	ACCOUNT_IS_EXISTS(1006,"账号已存在,请更换一个账号再提交"),
	
	RESOURCE_NOT_FOUND(4001,"资源不存在数据库"),
	
	FILE_EXISTS(4002,"已经存在该文件"),
	
	FILE_IS_EMPTY(4003,"上传文件为空"),
	
	SERVER_ERROR(5000, "服务端错误");
	
	private final int value;
	private final String reasonPhrase;
	
	CustomHttpStatus(int value, String reasonPhrase) {
		this.value = value;
		this.reasonPhrase = reasonPhrase;
	}

	public int getValue() {
		return value;
	}

	public String getReasonPhrase() {
		return reasonPhrase;
	}
	
}
